home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1994 November / Cd Ware (Nro. 2) - Epimundo.iso / OS2 / RCOPY.ZIP / RCOPY.DOC < prev   
Encoding:
Text File  |  1994-06-01  |  13.4 KB  |  339 lines

  1. RCOPY(c) Version 1.5  06/94  Dean. R. Ammons [73200,2513] All Rights Reserved
  2.  
  3.  
  4.    RCOPY is an extension of the OS/2 2.x COPY command.  With the available
  5.    options, a single RCOPY usage can perform tasks that would require
  6.    several OS/2 commands.  In addition to the parameter controlled
  7.    functions, RCOPY will:
  8.  
  9.       *  Displays progress messages.
  10.  
  11.       *  If the selected filename already exists in the target directory,
  12.          RCOPY will issue a warning pause, showing the size, time and date
  13.          of the current and new file.
  14.  
  15.       *  As a disk gets close to filling up, RCOPY will attempt to load the
  16.          smaller files until the smallest file remaining will not fit.
  17.  
  18.       *  When a disk does become full, RCOPY will pause to allow inserting
  19.          a new disk.
  20.  
  21.       *  Pressing any other key will pause processing.
  22.  
  23.       *  Unless overridden, a "Y/N" prompt will be issued before a new
  24.          directory is created.
  25.  
  26.  
  27.    RCOPY Parameters
  28.    ----------------
  29.  
  30.    RCOPY provides several optional command parameters to customize a
  31.    process.
  32.  
  33.       SYNTAX:  RCOPY from_spec [to_specs] [options]
  34.  
  35.    Entering a "?" at the end of the entered options will display a help
  36.    screen displaying the available parameters.  Any additional options
  37.    entered at the help prompt will be added to the startup options.
  38.  
  39.    [from] Enter the from_spec just like you would for the OS/2 Copy
  40.           command, including wildcard characters.  Unlike the OS/2 Copy,
  41.           RCOPY allows entering multiple from specs, each separated by a "+"
  42.           or comma (RCOPY *.EXE+*.COM A:\). Optionally, a file containing a
  43.           list of the from specs can be used.  The list of specifications
  44.           will be processed as if they were enter on the command line.  To
  45.           use this option, prefix the filename with the character "@"
  46.           (RCOPY @RCOPY.LST A:\).
  47.  
  48.    [to]   Enter the to_spec just like you would for the OS/2 Copy.  If
  49.           there is no to_spec, the current directory will be used.
  50.  
  51.           If the to_spec does not exist, RCOPY will prompt to determine if
  52.           it is a filename or directory.  To avoid this prompt, attach a
  53.           "\" to a new directory name or "." to a filename
  54.           (RCOPY *.* A:\NEWDIR\   RCOPY *.CMD A:\NEWFILE.)
  55.  
  56.  
  57.  
  58.    /A     Processes only files that have been marked updated by OS/2.
  59.  
  60.    /AD    Assume the to_spec is a directory if it does not exist.
  61.  
  62.    /AF    Assume the to_spec is a file if it does not exist.
  63.  
  64.    /AFX   If the to_spec does not exist and there is no extension, a new
  65.           directory is assumed.
  66.  
  67.    /AP    Append all the from_spec files to the end of the to_spec file.
  68.           (RCOPY FILE.A+FILE.B+FILE.C FILE.APP /AP)
  69.  
  70.    /AN    Assume a New Disk when the current disk becomes full.  The Bypass
  71.           and Split file options will not be available.
  72.  
  73.    /AS    Auto Split files when a disk becomes full and there is enough room
  74.           to do the split (bypassing initial "load disk" prompt).
  75.  
  76.    /B     After processing, remove the OS/2 update mark.
  77.  
  78.    /BO    Process only files that exist in both the from and to
  79.           directories.
  80.  
  81.    /D:)(=?
  82.           Select using the file date.  The selection criteria can be a date
  83.           (YYMMDD) or the number of days. The optional conditions are:
  84.  
  85.             ( - File date is older than requested.
  86.             ) - File date is newer than requested.
  87.             = - File date is equal to requested (default).
  88.  
  89.           Two /D: parameters can be used to select files between two dates.
  90.           To select all 1993 files, the parameter "/D:)921231/D:(940101"
  91.           would be used.  Files must meet BOTH conditions to be selected.
  92.           To select files that meet one OR the other condition, include the
  93.           parameter "/DO".
  94.  
  95.    /DF    Delete all files on the to_spec drive before processing.
  96.  
  97.    /DF2   If multiple output disks are required, delete all files starting
  98.           with disk #2.  Files will be added to the first disk without
  99.           deleting.
  100.  
  101.    /DC    Create duplicate directory on the to_spec disk for every directory
  102.           processed on the from_spec disk without prompting.
  103.  
  104.              * RCOPY C:\OS2\*.* A:\ /DC would create A:\OS2
  105.              * RCOPY C:\OS2\*.* A:\TEMP would create A:\TEMP\OS2
  106.  
  107.    /DEL   The from_spec files will be DELETED instead of copied or moved.
  108.           For example, to delete all files with an .BAK extension on the C:
  109.           drive:   RCOPY C:\*.BAK /DEL/S
  110.  
  111.    /DD:?  Drop the first "?" levels of the to_specs directory tree.
  112.  
  113.              RCOPY C:\OS2\SYSTEM D:\ /DC/DD:1
  114.                Copy all the files from C:\OS2\SYSTEM to D:\OS2
  115.              RCOPY C:\OS2\SYSTEM D:\ /DC/DD:2
  116.                Copy all the files from C:\OS2\SYSTEM to D:\
  117.  
  118.           Prefixing the level number with '-' will cause the first '?'
  119.           levels of the from_specs dirctory to be dropped.
  120.  
  121.                Copy all the files from C:\OS2\SYSTEM to D:\SYSTEM
  122.  
  123.    /DR:?  Repeat the same process for "?" drives.
  124.  
  125.    /DO    When two /D:, /T: or /SZ: parameters are used, invoke the "OR"
  126.           condition instead of "AND".
  127.  
  128.    /ED    Delete all the files in the to_specs directories before
  129.           processing from_spec files.
  130.  
  131.    /FA    Format all output each destination diskette before processing.
  132.  
  133.    /FA2   If multiple output disks are required, only format starting with
  134.           disk #2.  Files will be added to the first disk without
  135.           formatting.
  136.  
  137.    /H     Allows processing both HIDDEN and SYSTEM files.
  138.  
  139.    /IP:pathname
  140.           Process only files that exists in PATHNAME.
  141.  
  142.             RCOPY C:\*.* \TEMP /IP:\OS2\SYSTEM /S
  143.             Copy all files on "C" drive to \TEMP only if each file already
  144.             exists in \OS2\SYSTEM
  145.  
  146.    /IP-:pathname
  147.           Process only files that DO NOT exists in PATHNAME.
  148.  
  149.    /L     List files that meet selection criteria - NO processing occurs.
  150.  
  151.    /LG    Processing activities will be appended to the end of the file
  152.           RCOPY.LOG in the same directory where RCOPY.CMD is stored. To
  153.           create RCOPY.LOG in a different location, use /LG:<location> or
  154.           /LG:<location><new log file name>. Prefixing <location> with "@"
  155.           will cause RCOPY to create a new log file each time.
  156.  
  157.    /M     Move the selected from_spec files to the to_specs location.
  158.           Default is copy.
  159.  
  160.    /MU    Process multiple input disks.  To define how many input
  161.           diskettes, use /MU:nn.
  162.  
  163.    /N     Process only those files that do not already exist on the to_spec
  164.           directory.
  165.  
  166.    /NS    Suppress "beeps" issued at various prompts.
  167.  
  168.    /NT    Do not display totals when processing terminates.
  169.  
  170.    /OD:?  Specify a list of directories that are to be bypassed during
  171.           processing (RCOPY *.* C:\ /OD:\OS2,\MUGLIB).  All sub-directories
  172.           belonging to the requested directory will also be bypassed.  A
  173.           filename listing the directories can also be used by prefixing
  174.           with "@" (RCOPY *.* C:\ /OD:@DIR.LST). To bypass just the first
  175.           directory of a tree, attach a '\' to the directory name (RCOPY
  176.           *.* C:\ /OD:\OS2\,\MUGLIB).
  177.  
  178.    /OF:?  Specify a list of filenames or patterns to be bypassed during
  179.           processing (RCOPY *.* C:\ /OF:*.BAK,*.ZIP,*.$*).  A filename
  180.           listing the specs can also be used by prefixing with "@" (RCOPY
  181.           *.* C:\ /OF:@FILE.LST).
  182.  
  183.    /P     Pause before each file is processed.
  184.  
  185.    /PE    Pause at the end of processing.  Useful when executing RCOPY from
  186.           a window that closes on exit. To control the length of the pause,
  187.           enter /PEx, where "x" is the number of seconds to pause.
  188.  
  189.    /PGM:xxx
  190.           Execute the command "xxx" against all the selected files. To also
  191.           do a COPY or MOVE before executing the program, a TO directory
  192.           must be included. Multiple /PGM: options can be requested.
  193.  
  194.              $   Replaced with the full filenames of each selected file.
  195.              #   Replace with filename of each selected file (no path).
  196.              ]   Replaced with '/'.
  197.              {   Replaced with directory of file selected for processing.
  198.              %   Replaced with drive of file selected for processing
  199.              )   Replaced with '>'
  200.              (   Replaced with '<'
  201.              !   Replaced with '|'
  202.  
  203.           The following example shows how to print then zip every file on the
  204.           C: drive with a ".DOC" extension.
  205.  
  206.              RCOPY C:\*.DOC /S/PGM:PRINT/PGM:PKZIP2 -U ZIPFILE $ )NUL
  207.  
  208.           If a command is prefixed with "-", the commands will be written
  209.           to PGM.CMD instead of being executed.
  210.  
  211.              RCOPY C:\*.DOC /S/PGM:-PRINT/PGM:PKZIP2 -U ZIPFILE $ )NUL
  212.  
  213.           RCOPY defaults to passing ALL the selected files to the "/PGM:"
  214.           program.  To limit the number of files passed use the option
  215.           "/PGMn:", where "n" is the number of files to pass. For example, to
  216.           pass 30 selected files to PKZIP2 and one to PRINT per execution:
  217.  
  218.              RCOPY C:\*.DOC /S/PGM:PRINT/PGM30:PKZIP2 -U ZIPFILE $ )NUL
  219.  
  220.    /R     Replace duplicate files without prompting.
  221.  
  222.    /RD    Reset date of processed files to current date.
  223.  
  224.    /RE    Remove empty directories after MOVE process.
  225.  
  226.    /RO    Allow MOVING, REPLACING or DELETING Read-Only Files.  Copying
  227.           Read-Only files will always work.
  228.  
  229.    /S     Process all from_spec sub-directories.
  230.  
  231.    /SA    Instead of replacing a file, rename it by changing the last to
  232.           positions of the file's extension to "01" to "99".
  233.  
  234.    /SD    The progress display shows only the files processed and the final
  235.           totals.
  236.  
  237.    /SD2   The progress display shows only the files processed.
  238.  
  239.    /SE    Skip files that are EXACT duplicates.
  240.  
  241.    /SF:nnn
  242.           Splits the selected files into sub-files of "nnn" kilobytes
  243.           (kbyte=1024 bytes).  The sub-files are named filename.001,
  244.           filname.002, etc and will be stored in the copy-to directory.
  245.  
  246.    /ST:?  Reserve "?" amount of freespace on the to_specs drive.  Once the
  247.           minimum is reached, RCOPY will issue the load-next-disk prompt.
  248.  
  249.    /SZ:)(=?
  250.  
  251.           Select a file based on its size. Same rules as /D:
  252.  
  253.    /T     Test mode.  No actual processing takes place, but normal
  254.           processing messages are still issued
  255.  
  256.    /T:)(=?
  257.           Select a file based on its file time. Same rules as /D:
  258.  
  259.    /U     Process only files that either do not exist in the to_specs
  260.           directory or are newer than those that do exist.
  261.  
  262.    /US    Unsplits, or joins, the multiple files created using the "/SF:"
  263.           option.  For example, "RCOPY MYFILE.ZIP /US" will join the files
  264.           MYFILE.001, MYFILE.002, ... into the file MYFILE.ZIP. The join file
  265.           will be stored in the copy-to directory.  If the split files are
  266.           stored on multiple diskettes, use the "/MU" option (diskettes must
  267.           be processed in correct sequence).
  268.  
  269.    /V     Verify a process using the OS/2 verify option.
  270.  
  271.    /WA    Pause RCOPY's initial processing and prompt for a diskette.
  272.  
  273.    /WY    Display the files that were skipped and tell why.
  274.  
  275.    RCOPY Return Codes
  276.    ------------------
  277.  
  278.    RCOPY returns five values.
  279.  
  280.       1)  Return code "0" if process completed successfully or "1" if not
  281.       2)  Number of files copied/moved/deleted, depending on option used. If
  282.           the /SF: option is used, this will be the number of split files
  283.           created.  If the /US options is used, this will be the number of
  284.           joined files created.
  285.       3)  Number of input disks processed
  286.       4)  Number of files processed, including those skipped or bypassed
  287.       5)  Number of bytes copied/moved/deleted
  288.  
  289.    The syntax to capture these values:
  290.  
  291.     parse value RCOPY(specs) with ret_cd copied nbr_disks processed bytes .
  292.  
  293.    The following parameters are available for passing the values in 2-5
  294.    from one execution of RCOPY to another.
  295.  
  296.      /#ND:n  - Number Disks
  297.      /#FC:n  - Files copied
  298.      /#FP:n  - Files processed
  299.      /#BC:n  - Bytes copied
  300.  
  301.    When these values are passed to RCOPY, they are included in final totals.
  302.    (useful when command file does multiple RCOPYs with different options).
  303.  
  304.  
  305. Example of RCOPY Uses
  306. ---------------------
  307.  
  308. 1)  Move all the files on the A: drive to the appropriate sub-directories on
  309.     the C: drive, replacing files that already exists and removing the
  310.     directories from A:.
  311.  
  312.       call RCOPY 'A:\*.* C:\ /S/DC/M/RE'
  313.  
  314. 2)  Copy all the files on the C: drive to the appropriate sub-directories on
  315.     the A: drive that were updated today, bypassing directories listed in the
  316.     file RCOPY.OD and bypassing the filespecs in the file RCOPY.OF.
  317.  
  318.       call RCOPY 'C:\*.* A:\ /S/DC/V/OD:@C:\RCOPY.OD/OF:@C:\RCOPY.OF/D:)1'
  319.  
  320. 3)  The following is an example of multiple RCOPY runs, with each execution
  321.     using the statistics from the previous run (10,000 bytes is reserved for
  322.     the file INSTALL.CMD).
  323.  
  324.       /* */
  325.       parse value RCOPY('*.ZIP+*.CMD A:\ /AN/SD2/NT/DF/ST:10000) with
  326.         retcd copied nbrdisks processed bytes  .
  327.       if retcd<>0 then
  328.          EXIT
  329.       .....
  330.         Code to create INSTALL.CMD
  331.       .....
  332.       if nbrdisks>1 then
  333.          do
  334.            say 'Please Re-Insert Disk #1'
  335.            pause
  336.          end
  337.       call RCOPY 'INSTALL.CMD A:\ /SD/V/#FC:'||copied||'/#FP:'||processed||
  338.         '/#ND:1/#BC:'||bytes
  339.